<HTML><HEAD><TITLE>sleep(+Seconds)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Operating System</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>sleep(+Seconds)</H1>
The execution of ECLiPSe is suspended for Seconds number of seconds.


<DL>
<DT><EM>Seconds</EM></DT>
<DD>Positive number (integer or float).
</DD>
</DL>
<H2>Description</H2>
   sleep/1 causes the the suspension of execution of ECLiPSe for Seconds
   number of seconds.

<P>
   However, ECLiPSe will respond to interrupts while asleep.  On most
   operating systems, interrupts will terminate the sleep prematurely.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>sleep(+) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Seconds is uninstantiated.
<DT><EM>(5) type error </EM>
<DD>Seconds is not an integer or float.
</DL>
<H2>Examples</H2>
<PRE>
Success:
      [eclipse]: sleep(0.3).
                           % short sleep
      yes.                 % "yes" appears after 0.3 seconds.

      [eclipse]: sleep(63072000).
                           % long sleep
      yes.                 % "yes" appears after 2 years.



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/opsys/alarm-1.html">alarm / 1</A>, <A HREF="../../kernel/opsys/pause-0.html">pause / 0</A>
</BODY></HTML>
